package com.wodsy.phoenix.dataobject.goodsc.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * TbGoodsConsult entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_goods_consult", catalog = "goodsc")
public class GoodsConsult implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 1L;
	
	private Integer id;
	private Integer goodsId;		//商品id
	private Integer userId;			//用户id
	private String question;			//问题
	private String answer;			//答案
	private boolean sellerRead;		//卖家是否读取了咨询信息，0未读，1已读
	private boolean buyerRead;			//买家是否读取了回复信息，0未读，1已读
	private boolean sendEmailFlag;		//1表示发送，0表示不发送
	private Date consultAddTime;	//提问日期
	private Date replyAddTime;		//回复时间
	private GoodsConsult consultType;		//问题类型0：商品咨询1：库存及配送3：支付问题3：发票及保修

	// Constructors

	/** default constructor */
	public GoodsConsult() {
	}

	/** minimal constructor */
	public GoodsConsult(Integer goodsId, Integer userId, String question,
			String answer, boolean sellerRead, boolean buyerRead,
			boolean sendEmailFlag, Date consultAddTime, GoodsConsult consultType) {
		this.goodsId = goodsId;
		this.userId = userId;
		this.question = question;
		this.answer = answer;
		this.sellerRead = sellerRead;
		this.buyerRead = buyerRead;
		this.sendEmailFlag = sendEmailFlag;
		this.consultAddTime = consultAddTime;
		this.consultType = consultType;
	}

	/** full constructor */
	public GoodsConsult(Integer goodsId, Integer userId, String question,
			String answer, boolean sellerRead, boolean buyerRead,
			boolean sendEmailFlag, Date consultAddTime,
			Date replyAddTime, GoodsConsult consultType) {
		this.goodsId = goodsId;
		this.userId = userId;
		this.question = question;
		this.answer = answer;
		this.sellerRead = sellerRead;
		this.buyerRead = buyerRead;
		this.sendEmailFlag = sendEmailFlag;
		this.consultAddTime = consultAddTime;
		this.replyAddTime = replyAddTime;
		this.consultType = consultType;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "goods_id", nullable = false)
	public Integer getGoodsId() {
		return this.goodsId;
	}

	public void setGoodsId(Integer goodsId) {
		this.goodsId = goodsId;
	}

	@Column(name = "user_id", nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "question", nullable = false, length = 128)
	public String getQuestion() {
		return this.question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	@Column(name = "answer", nullable = false, length = 128)
	public String getAnswer() {
		return this.answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	@Column(name = "seller_read", nullable = false)
	public boolean getSellerRead() {
		return this.sellerRead;
	}

	public void setSellerRead(boolean sellerRead) {
		this.sellerRead = sellerRead;
	}

	@Column(name = "buyer_read", nullable = false)
	public boolean getBuyerRead() {
		return this.buyerRead;
	}

	public void setBuyerRead(boolean buyerRead) {
		this.buyerRead = buyerRead;
	}

	@Column(name = "send_email_flag", nullable = false)
	public boolean getSendEmailFlag() {
		return this.sendEmailFlag;
	}

	public void setSendEmailFlag(boolean sendEmailFlag) {
		this.sendEmailFlag = sendEmailFlag;
	}

	@Column(name = "consult_add_time", nullable = false, length = 19)
	public Date getConsultAddTime() {
		return this.consultAddTime;
	}

	public void setConsultAddTime(Date consultAddTime) {
		this.consultAddTime = consultAddTime;
	}

	@Column(name = "reply_add_time", length = 19)
	public Date getReplyAddTime() {
		return this.replyAddTime;
	}

	public void setReplyAddTime(Date replyAddTime) {
		this.replyAddTime = replyAddTime;
	}

	@Column(name = "consult_type", nullable = false)
	public GoodsConsult getConsultType() {
		return this.consultType;
	}

	public void setConsultType(GoodsConsult consultType) {
		this.consultType = consultType;
	}

}